/**
 * PacketEvent Class
 * @version : 0.1
 * @author  : young sub Lim (limys1@gmail.com)
 */

package net.ktims.packet;

import java.util.EventObject;
import java.net.Socket;
import java.io.DataInputStream;

public class PacketEvent extends EventObject 
{
	private byte[] msg = null;
	private String ip = null;
	private int socketID = -1;

	private Socket socket = null;	

	/** Event : New packet is received */
	public PacketEvent(Object source, byte[] msg, String ip, int socketID, Socket socket) {
		super(source);
		this.msg = msg;
		this.ip = ip;
		this.socketID = socketID;
		
		this.socket = socket;
	}
		
	public Socket getSocket() {
		return socket;
	}	
	
	public void setSocket(Socket socket) {
		this.socket = socket;
	}

	public byte[] getReadBuffer() {
		return this.msg;
	}

	public void setReadBuffer(byte[] msg) {
		this.msg = msg;
	}
	
	public int getSocketID() {
		return socketID;
	}

	public void setSocketID(int socketID) {
		this.socketID = socketID;
	}

	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}	
}
